import { ref } from 'vue'
import { defineStore, acceptHMRUpdate } from 'pinia'

export const noticStore = defineStore('notic', () => {
    const tabIndex = ref(0)
    //记录模拟考试试卷的index
    const mockInfo = ref([])
    //记录正式考试试卷的index
    const examInfo  = ref([])
    //记录专项练习的index和题目答案
    const myExerInfo = ref([])
    //记录基础练习的index和题目答案
    const baseExerInfo = ref([])
    //定义字体大小变量
    const fontSize = ref('middle')
    // actions 设置字体大小
    const setFontSize = (value) => {
        fontSize.value = value
    }
    const getFontSize = () => {
        return fontSize.value
    }
    return { tabIndex, mockInfo,examInfo, fontSize,myExerInfo,baseExerInfo, setFontSize, getFontSize }
}, {
	unistorage: true
})

if (import.meta.hot) {
    import.meta.hot.accept(acceptHMRUpdate(noticStore, import.meta.hot))
}